<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="app">
    <!--组件，传递给组件中的值：props-->
    <cljh v-for="a in items" v-bind:item="a"></cljh>


</div>
<script src="vue.js"></script>
<script>
    //定义一个Vue组件
    Vue.component("cljh",{
        props: ['item'],
        template: '<li>{{item}}</li>'
    });
    var vm=new Vue({
        el: "#app",
        data:{
            items: ["java","Linux","前端"]
        }
    });
</script>
</body>
</html>